package com.testwa.distest.client.device.listener.callback.remote;import com.google.protobuf.ByteString;import com.testwa.distest.client.device.driver.IDeviceRemoteControlDriver;import com.testwa.distest.client.device.listener.callback.IRemoteCommandCallBack;import lombok.extern.slf4j.Slf4j;/** * @Program: distest * @Description: * @Author: wen * @Create: 2018-05-08 16:36 **/@Slf4jpublic class ButtonEventCallback implements IRemoteCommandCallBack<ByteString> {    private IDeviceRemoteControlDriver driver;    private int keyCode;    public ButtonEventCallback(IDeviceRemoteControlDriver driver, int keyCode) {        this.driver = driver;        this.keyCode = keyCode;    }    @Override    public void callback(ByteString bytes) {        String result = bytes.toStringUtf8();//        ADBCommandUtils.inputCode(client.getClientId(), keyCode, 5000L);        driver.keyevent(this.keyCode);    }}